#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import get_vol_cur
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    volcur = []
    volcur = dr.get_vol_cur(id_num=data.id_num)
    rospy.loginfo("get_vol_cur_node: [%f, %f]", volcur[0], volcur[1])


def listener():
    rospy.init_node("get_vol_cur", anonymous=True)
    rospy.Subscriber("get_vol_cur", get_vol_cur, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

